package config

import (
	"fmt"
	"github.com/spf13/viper"
	"testing"
)

func TestInit(t *testing.T) {
	viper.SetConfigFile(configPath)

	if err := viper.ReadInConfig(); err != nil {
		fmt.Println("read config file error")
	}

	var config Config
	if err := viper.Unmarshal(&config); err != nil {
		fmt.Println("unmarshal config error")
	}
	fmt.Printf("config: %+v\n", config)
}
